package cn.itcast.bos.service.take_delivery;

import domain.page.PageBean;
import domain.take_delivery.Promotion;
import cn.itcast.bos.service.base.BaseService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import javax.ws.rs.*;
import java.util.Date;

/**
 * Created by Administrator on 2017/7/21/021.
 */
@Produces({"application/json"})
@Consumes({"application/xml","application/json"})
@Path("/")
public interface PromotionService extends BaseService<Promotion>{

    Page<Promotion> findAll(Pageable pageable);

    //通过webservice获取page信息
    @Path("/pageQuery")
    @GET
    @Produces({"application/xml","application/json"})
    PageBean<Promotion> findPageData(@QueryParam("page") int page,@QueryParam("rows") int rows);

    @Path("/promotion/{id}")
    @GET
    @Produces({"application/xml","application/json"})
    Promotion findById(@PathParam("id") Integer id);

    void updateStatus(Date date);
}
